1. Field of the Invention
The present invention relates to color image encoding and/or decoding, and more particularly, to image and video encoding and decoding methods and apparatuses using a single coding mode for all color components.
2. Description of the Related Art
Generally, an image obtained by a device in an RGB format. However, when the image thus obtained is compressed, the image is converted into a YCbCr image format. At this time, Y is monochrome and has only a luminance component and Cb and Cr have chrominance components. In the RGB image, information is evenly distributed between R, G, and B data, but in the YCbCr image format, information is concentrated in the Y component, and less information is in the Cb and Cr components. Accordingly, when compression is performed in the YCbCr image format, the compression efficiency is enhanced.
Since the statistical characteristics of the Y component in the YCbCr image is different from the statistical characteristics of the Cb and Cr components, in a conventional encoding method, the Y component and the Cb and Cr components are compressed using different methods, respectively. For example, in the MPEG-4 AVC/H.264 standard produced by Joint Video Team of ISO/IEC MPEG and ITU-T VCEG, which has been standardized recently (“Text of ISO/IEC FDIS 14496-10: Information Technology—Coding of audio-visual objects—Part 10: Advanced Video Coding”, ISO/IEC JTC 1/SC 29/WG 11, N5555, March 2003), when the Y component is encoded as an intra image in a video signal, spatial prediction is performed in units of 4×4 blocks using 9 prediction methods along a prediction direction. Also, spatial prediction can be performed in units of 16×16 blocks using 4 prediction methods along a prediction direction. However, since the image containing Cb and Cr components is relatively simpler than an image containing the Y component, when the Cb and Cr components are encoded as an intra image in a video signal, spatial prediction is performed in units of 8×8 blocks along a prediction direction using 4 prediction methods, independently of the Y component.
Also, when encoding of an image is performed in inter mode, motion compensation of the Y component is precisely performed by expanding a prediction image using a 6-tap filter, while motion compensation of Cb and Cr components is performed by expanding a prediction image using a bilinear filter. Thus, in the conventional method, different compression methods are used for the Y component and Cb and Cr components to compress an image because the statistical characteristics of the Y component and the Cb and Cr components are different from each other.
However, when an RGB image is converted into a YCbCr image, loss of image quality, such as color distortion, can occur, and therefore, a direct encoding method of an RGB image has been researched recently. In particular, a fidelity range extension standard of the MPEG-4-AVC/H.264 standard supports direct encoding of an RGB image. In this newly adopted technology, a residue transform technology is used to perform spatial or temporal prediction in the RGB image, and after a residue image is obtained, redundant information existing in each of R, G, and B data is removed such that the encoding efficiency is enhanced without lowering the picture quality.
When the RGB image is encoded, the encoding efficiency of the conventional method is lowered as described above because the method used for the YCbCr is applied without change. Accordingly, when the RGB input image is encoded in an RGB domain without converting the image into a YCbCr image, a method of enhancing the encoding efficiency with maintaining a high picture quality by performing spatial prediction and temporal prediction in accordance with the statistical characteristics of the RGB image is needed.